////////////////////////////////////////////////////////
// CmdLeave.h
////////////////////////////////////////////////////////
#pragma once

#define AST_CMD_PLAY_SND_1 "Action: Command\r\n"\
                           "Command: conference play sound %s"\
                           " /tmp/%s/%s conf-hasleft\r\n\r\n"
#define AST_CMD_PLAY_SND_2 "Action: Command\r\n"\
                           "Command: conference play sound %s"\
                           " leave mute\r\n\r\n"
#define AST_CMD_PLAY_SND_3 "Action: Command\r\n"\
                           "Command: conference kickchannel %s"\
                           "\r\n\r\n"

#define AST_CMD_START_CONF_1 "Action: Command\r\n"\
                             "Command: conference start moh %s"\
                             " \r\n\r\n"

#define AST_ERR_CONF_LEAVE_1 "ERR : event_confleave, have no"\
                             " any related channel.[flag %c]\n"
#define AST_ERR_CONF_LEAVE_2 "ERR : event_confleave, main user"\
                             " have no partner.\n"

class CCmdLeave : public CCmdBase 
{
public:
   /* implementation of virtual function */
   void   init();
   void   release();
   void * parse( char * aCommandStr );
   int    event();

public: // operator
   CCmdLeave &operator = ( const CCmdLeave & aOther );
   int operator == ( const CCmdLeave & aOther );
   int operator <  ( const CCmdLeave & aOther );
   int operator >  ( const CCmdLeave & aOther );

public:
   typedef CCmdBase super;
   CCmdLeave();
   ~CCmdLeave();

public: // variable
   char mConferenceName[32];
   char mUniqueId[32];
   char mFlags[12];
   char mCallerId[32];
   char mCallerIdName[32];
   int  mMember;
   int  mDuration;
   int  mCount;
};
////////////////////////////////////////////////////////
